package com.learn.dict.event;

import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 功能描述: 字典重新加载事件操作 <br/>
 *
 * @author: MI
 * @email: 448341911@qq.com
 * @createDate: 2023/10/27 23:10
 * @updateUser: MI
 * @updateDate: 2023/10/27 23:10
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Component
public class DictReloadPublishEvent {

    @Resource
    private ApplicationContext applicationContext;

    public void publishEvent(String typeCode) {
        DictEvent event = new DictEvent(this, typeCode);
        applicationContext.publishEvent(event);
    }
}
